package com.tuo51.manager.vo;

import lombok.Data;

import java.math.BigInteger;
import java.util.Date;

//SELECT * FROM ( " +
//        "    SELECT s.`mobile`, s.`id`, s.`created`, i.`name` , i.`contact_number` , SUBSTRING_INDEX(i.`pca_code_desc`,   ''-'', 2) as province " +
//        "        , (SELECT COUNT(*) FROM `tb_evaluate_record` r WHERE r.`finished` = true and r.`createTeacherId` = s.id) as reportCount " +
//        "        , (SELECT COUNT(*) FROM `children` c WHERE c.`staffId` = s.id) as childrenCount " +
//        "        , (SELECT COUNT(*) FROM `tb_evaluate_record` r WHERE r.`finished` = true and r.`createTeacherId` = s.id and r.`evaluatingDate`  > date_sub(curdate(),INTERVAL WEEKDAY(curdate()) + 1 DAY)) as weekNewReport " +
//        "        , (SELECT COUNT(*) FROM `children` c WHERE c.`staffId` = s.id and c.`created` > date_sub(curdate(),INTERVAL WEEKDAY(curdate()) + 1 DAY)) as weekNewChildren " +
@Data
public class StaffListItemVO {
    String mobile;
    String id;
    Date created;
    String name;
    String contact_number;
    String province;
    BigInteger reportCount;
    BigInteger childrenCount;
    BigInteger weekNewReport;
    BigInteger weekNewChildren;

    Integer admin;
}
